home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Serial / DLL / MkStubsOs < prev    next >
Text File  |  1995-09-04  |  3KB  |  144 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.NZPWOnRec    \
  4.             o.Activate    \
  5.             o.Deactivate    \
  6.             o.GetByte    \
  7.             o.GetFormat    \
  8.             o.GetRxRate    \
  9.             o.GetStatus    \
  10.             o.GetTxRate    \
  11.             o.PutByte    \
  12.             o.SendBreak    \
  13.             o.SetFormat    \
  14.             o.SetRxRate    \
  15.             o.SetStatus    \
  16.             o.SetTxRate    \
  17.  
  18.  
  19. LibName        =    Serial
  20.  
  21.  
  22.  
  23. # Template makefile to make all .o files
  24. # and the SDLS Stubs file for DeskLib
  25. # sublibraries.
  26. # Julian Smith 16 Mar 1995.
  27.  
  28.  
  29. # The macro $(ObjectFiles) should be set at the 
  30. # start of this file, to be a space-separated
  31. # list of object files.
  32. # This is done by 'Makatic'.
  33.  
  34.  
  35. # The macro $(LibName) should also be set at the 
  36. # start of this file, to be the name of the 
  37. # DeskLib sublibrary.
  38. # This is done by 'Makatic'.
  39.  
  40. # Compiler and linker flags, These can be anything. 
  41. # All flags required by Straylight (eg CC -zM and
  42. # Link -rmf) are included in the macros $(CC) and
  43. # $(LINK).
  44. #
  45. CCFlags        =    -fahi $(CCExtra) -depend !Depend -throwback -D_DeskLib_$(LibName) -I,C:
  46. ASMFlags    =    -Stamp -NoCache -CloseExec -Quit $(ASMExtra)
  47.  
  48.  
  49. # Macros for commands, including the Straylight
  50. # tool 'cdll'. Note that DRLink doesn't seem to
  51. # work with the SDLS.
  52. #
  53. CC        =    cc -c -zM -d_DLL -JC:DLLLib.,:mem $(CCFlags)
  54. ASM        =    ObjAsm $(ASMFlags)
  55. CDLL        =    cdll
  56. LINK        =    link
  57. AS        =    as -dde -throwback
  58.  
  59.  
  60. # filename of DLL Stubs aof file. This is linked with client apps.
  61. DLL_Stubs    =    Stubs
  62.  
  63.  
  64. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  65. #
  66. # DLL_Def:        Standard definition file as per SDLS docs.
  67. # DLL_OtherStubsSource    Assembler source to be partially linked into
  68. #            the final stubs file. This will force linking
  69. #            in of stubs from any other DLLs used by this
  70. #            library when a client application is built.
  71. # DLL_PlainStubs    The vanilla stubs file created by SDLS's cdll.
  72. # DLL_OtherStubsObject    Assembled from DLL_OtherStubsSource. This
  73. #            simply imports __DeskLib_SDLS_Stubs_<libname>'s
  74. #            for all DeskLib DLLs used by this library, and
  75. #            exports __DeskLib_SDLS_Stubs_<thislibname>.
  76. #
  77. DLL_Def            =    ^.DLLDef
  78. DLL_OtherStubsSource    =    ^.OtherStubs
  79.  
  80. DLL_PlainStubs        =    PlainStubs
  81. DLL_OtherStubsObject    =    OSObj
  82.  
  83. # -------------------------------------------------------
  84. # Everything below here should probably not be changed...
  85. # -------------------------------------------------------
  86.  
  87.  
  88.  
  89. # Now all the rules...
  90.  
  91.  
  92. # Here's the two things we want to make...
  93. #
  94. All:    $(DLL_Stubs) $(ObjectFiles)
  95.  
  96. $(DLL_Stubs):    $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  97.     $(LINK) -aof -o $@ $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  98.  
  99. $(DLL_PlainStubs):    $(DLL_Def)
  100.     $(CDLL) -def $(DLL_Def) -stub $(DLL_PlainStubs)
  101.  
  102.  
  103. #$(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  104. #    $(AS) -o $(DLL_OtherStubsObject) $(DLL_OtherStubsSource)
  105.  
  106. $(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  107.     $(ASM) $(ASMFlags) -from $(DLL_OtherStubsSource) -to $(DLL_OtherStubsObject) 
  108.  
  109.  
  110. $(DLL_Def):    
  111.     | Warning: No DLL definition file exists.
  112.     | Creating a default DLL definition file: $(DLL_Def)
  113.     | This will have to be altered by hand.
  114.     $(CDLL) -def $(DLL_Def) -obj $(ObjectFiles)
  115.  
  116.  
  117.  
  118. # Rule for compiling C source code for a Straylight dynamically-linked library.
  119.  
  120. VPATH = @.^
  121.  
  122. .SUFFIXES:    .o .c .s
  123.  
  124. .c.o:
  125.     $(CC) -o $@ $<
  126.  
  127. .s.o:
  128.     $(ASM) $(ASMFlags) -from $< -to $@
  129.  
  130.  
  131.  
  132. # Dynamic dependencies:
  133. o.NZPWOnRec:    ^.c.NZPWOnRec
  134. o.NZPWOnRec:    C:h.stdlib
  135. o.NZPWOnRec:    C:h.string
  136. o.NZPWOnRec:    DeskLib:h.Core
  137. o.NZPWOnRec:    C:h.stddef
  138. o.NZPWOnRec:    C:DLLLib.h.dll
  139. o.NZPWOnRec:    C:h.kernel
  140. o.NZPWOnRec:    DeskLib:h.SWI
  141. o.NZPWOnRec:    DeskLib:h.Error
  142. o.NZPWOnRec:    DeskLib:h.Serial
  143.